package com.bifang.module.file.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 文件归集分类关系表
 *
 * @author shun
 * @since 2023-03-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("file_collect_class")
@Schema(name = "FileCollectClass", title = "文件归集分类关系表", description = "文件归集分类关系表实体类")
public class FileCollectClass extends Model<FileCollectClass> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "collectClassCode", title = "文件分类归集关系id")
    @TableId(value="COLLECT_CLASS_CODE", type = IdType.INPUT)
    private String collectClassCode;

    @Schema(name = "fileCollectCode", title = "文件归集分类编号")
    @TableField(value = "FILE_COLLECT_CODE")
    private String fileCollectCode;

    @Schema(name = "fileClassCode", title = "文件分类编号")
    @TableField(value = "FILE_CLASS_CODE")
    private String fileClassCode;

    @Schema(name = "createName", title = "创建人")
    @TableField(value = "CREATE_NAME", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", title = "创建时间")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", title = "更新人")
    @TableField(value = "UPDATE_NAME", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", title = "更新时间")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "del", title = "逻辑删除标志 0 未删除 1 删除")
    @TableField(value = "DEL", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.collectClassCode;
    }
}
